﻿using System;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Ink;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using Hydra.Shell.Interfaces;
using UIObjects;

namespace Hydra.Shell.DelayObjects
{
    public class DelayedWindowFrame : DelayedObjectBase<IHydraWindowFrame>, IHydraWindowFrame
    {
        public DelayedWindowFrame(ILog log, TimeSpan? delayTimeout = null) : base(log, delayTimeout)
        {
        }

        public DelayedWindowFrame(TimeSpan? delayTimeout = null) : base(delayTimeout)
        {
        }

        public bool CloseFrame(Enumerations.FrameClose grfSaveOptions)
        {
            ThrowIfNotReady();

            return innerObject.CloseFrame(grfSaveOptions);
        }

        public bool GetFramePos(Enumerations.HydraSetFramePos[] pdwSFP, out Guid pguidRelativeTo, out int px, out int py, out int pcx, out int pcy)
        {
            ThrowIfNotReady();

            return innerObject.GetFramePos(pdwSFP, out pguidRelativeTo, out px, out py, out pcx, out pcy);
        }

        public bool GetGuidProperty(Enumerations.HydraFrameProperties propid, out Guid pguid)
        {
            ThrowIfNotReady();

            return innerObject.GetGuidProperty(propid, out pguid);
        }

        public bool GetProperty(Enumerations.HydraFrameProperties propid, out object pvar)
        {
            ThrowIfNotReady();

            return innerObject.GetProperty(propid, out pvar);
        }

        public bool Hide()
        {
            ThrowIfNotReady();

            return innerObject.Hide();
        }

        public bool IsOnScreen
        {
            get 
            {
                ThrowIfNotReady();

                return innerObject.IsOnScreen;
            }
        }

        public bool IsVisible
        {
            get 
            {
                ThrowIfNotReady();

                return innerObject.IsVisible;
            }
        }

        public bool QueryViewInterface(ref Guid riid, out IUnknown ppv)
        {
            ThrowIfNotReady();

            return innerObject.QueryViewInterface(ref riid, out ppv);
        }

        public bool SetFramePos(Enumerations.HydraSetFramePos dwSFP, ref Guid rguidRelativeTo, int x, int y, int cx, int cy)
        {
            ThrowIfNotReady();

            return innerObject.SetFramePos(dwSFP, ref rguidRelativeTo, x, y, cx, cy);
        }

        public bool SetGuidProperty(Enumerations.HydraFrameProperties propid, ref Guid rguid)
        {
            ThrowIfNotReady();

            return innerObject.SetGuidProperty(propid, ref rguid);
        }

        public bool SetProperty(Enumerations.HydraFrameProperties propid, object var)
        {
            ThrowIfNotReady();

            return innerObject.SetProperty(propid, var);
        }

        public bool Show()
        {
            ThrowIfNotReady();

            return innerObject.Show();
        }

        public bool ShowNoActivate()
        {
            ThrowIfNotReady();

            return innerObject.ShowNoActivate();
        }

        public bool Advise(IHydraWindowFrameNotify pNotify, out uint pdwCookie)
        {
            ThrowIfNotReady();

            return innerObject.Advise(pNotify, out pdwCookie);
        }

        public bool Unadvise(uint dwCookie)
        {
            ThrowIfNotReady();

            return innerObject.Unadvise(dwCookie);
        }

        public bool ActivateOwnerDockedWindow()
        {
            ThrowIfNotReady();

            return innerObject.ActivateOwnerDockedWindow();
        }

        public bool IsDisposed
        {
            get { throw new NotImplementedException(); }
        }

        public bool QueryInterface(Guid iid, out IUnknown interfaceObject)
        {
            throw new NotImplementedException();
        }

        public bool QueryInterface<T>(out T interfaceObject)
        {
            throw new NotImplementedException();
        }
    }
}
